package assist.domain.model;

import javax.jdo.annotations.Inheritance;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;

@PersistenceCapable(detachable = "true")
@Inheritance(customStrategy = "complete-table")
public class Goal extends ShotOnGoal
{
    @NotPersistent
    private static final long serialVersionUID = 1L;    
    @NotPersistent
    private Player assist1;
    @NotPersistent
    private Player assist2;
    /**
     * @param assist1 the assist1 to set
     */
    public void setAssist1(Player assist1)
    {
        this.assist1 = assist1;
    }
    /**
     * @return the assist1
     */
    public Player getAssist1()
    {
        return assist1;
    }
    /**
     * @param assist1 the assist1 to set
     */
    public void setAssist2(Player assist2)
    {
        this.assist2 = assist2;
    }
    /**
     * @return the assist1
     */
    public Player getAssist2()
    {
        return assist2;
    }    
    
    /**
     * Convenience method, returns the Shoooter as the Scorer.
     * @return the goal scorer.
     */
    public Player getScorer()
    {
        return this.getShooter();
    }    
}
